#ifndef _main__h   
#define __main_h
//HAL--------------------
		

        
//Const--------------------
  #define D_1s         250   //1s
	#define D_40ms       10    //40ms
	#define D_300ms   75 //300ms
	#define D_500ms      125     //500ms
	 #define D_1m        60 
	 
	 
	 #define D_keyOnOff 4
	 #define D_keyYuYue 1
	 #define D_keyfunction 3
	 #define D_keyWenDu 2
	 
	 
	#define D_ShaoShui 			1
    #define D_KuaiDun  			2
    #define D_ManDun   			3
    #define D_YanWo				4
    #define D_YuJiao			5
    #define D_SuanNai			6
    #define D_HuaCha			7
    #define D_YangShengTang		8
    #define D_ShuiGuoCha		9
    #define D_BaoWen			10
    #define D_ZhuDan			11
    #define D_YaoShan			12
	 

	 
	 
	 
//Var----------------------
#ifdef  MAIN_C 
uint8_t timer1s;
	uint8_t  timer40ms; 
	uint8_t timer300ms;
	uint8_t  timer500ms; 
	uint8_t timer1m;
 uint8_t  keyValue;
uint8_t longKeyHoldTime;
uint8_t longKeyValue;
uint8_t holdKey;
uint8_t longKeyJudgeTime;
uint8_t startTime;
bit  bSecFlash500ms;
uint8_t function;
uint8_t timerClock;
bit bPowerOnOff;
uint16_t yuYueTime;
bit bYuYue;
uint8_t flashFunctionTime;
bit bFunctionSure;
uint8_t setTemp;
uint8_t flashSetTemp;
bit bFinishBuzz;
uint16_t workTime;
uint8_t step;
bit bPowerSave;
bit b100;
uint8_t finishBuzzNum;
bit bAdOffBuzz;
uint8_t adOffBuzzNum;
bit bAdShortBuzz;
uint8_t cycleNum;
uint8_t yuYueHoldTime;
uint8_t holdTime100;
 #else
	 extern uint8_t holdTime100;
	 extern uint8_t yuYueHoldTime;
 extern uint8_t cycleNum;
 extern bit bAdOffBuzz;
extern uint8_t adOffBuzzNum;
extern bit bAdShortBuzz;
 extern uint8_t finishBuzzNum;
 extern bit b100;
 extern bit bPowerSave;
 extern uint8_t step;
 extern uint16_t workTime;
 extern bit bFinishBuzz;
 extern uint8_t flashSetTemp;
extern bit bPowerOnOff;
 extern uint16_t yuYueTime;
extern bit bYuYue;
extern uint8_t flashFunctionTime;
extern bit bFunctionSure;
extern uint8_t setTemp;
 extern uint8_t timerClock;
 extern uint8_t function;
 extern bit  bSecFlash500ms;
extern uint8_t longKeyHoldTime;
extern uint8_t longKeyValue;
extern uint8_t holdKey;
extern uint8_t longKeyJudgeTime;
extern uint8_t startTime;
extern  uint8_t  keyValue;
extern uint8_t timer1s;
	extern uint8_t  timer40ms; 
	extern uint8_t timer300ms;
	extern uint8_t  timer500ms; 


 #endif
   

//Function----------------------
void GetHighTemp();
void KettleJudge();
void functionControl();
void functionDisplay();
void keyWenDu();
void keyFunction();
void keyYuYue();
void keyOnOff();
void timerControl() ;
void getKey();
void PowerOff() ;
#endif